//! white-user set deserialization.

use std::collections::BTreeMap;
use crate::{hash::Address};
use serde::Deserialize;

/// Different ways of specifying white-users.
/// 使用多种方式来设置白名单用户
#[derive(Debug, PartialEq, Deserialize)]
#[serde(deny_unknown_fields)]
#[serde(rename_all = "camelCase")]
pub enum WhiteUserSet {
    /// A simple list    of white-users.
    /// 配置文件中写死的白名单列表
    List(Vec<Address>),
    /// Address of a contract that indicates the list of white-users.
    /// 通过智能合约来设置白名单
    Contract(Address),
    // /// A map of starting blocks for each validator set.
    // /// 通过初始化列表+智能合约的方式俩构造白名单
    // Multi(BTreeMap<String, WhiteUserSet>),
}